package com.karson.common.request;

import com.karson.common.constants.RegularConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Schema(name = "LoginMobileRequest", description = "手机号注册")
public class LoginMobileRequest implements Serializable {



    @Schema(
        description = "手机号", 
        requiredMode = Schema.RequiredMode.REQUIRED,
        example = "13800138000"
    )
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegularConstants.PHONE_TWO, message = "手机号码格式错误")
    private String phone;

    @Schema(
        description = "验证码", 
        requiredMode = Schema.RequiredMode.REQUIRED,
        example = "123456"
    )
    @Pattern(regexp = RegularConstants.VALIDATE_CODE_NUM_SIX, message = "验证码格式错误，验证码必须为6位数字")
    private String captcha;

}